<div class="rightBoxTop pr">
    <div class="rightBoxTopFl">
        <a href="{:U('Project/index')}" class="ts300 <if condition="$_GET['status'] neq 1">aHover</if>">进行中的项目</a>
        <a href="{:U('Project/index',array('status'=>1))}" class="ts300 <if condition="$_GET['status'] eq 1">aHover</if>">已完结的项目</a>
    </div>
    <div class="rightBoxTopFr part">                    
        <input type="text" class="pa text searchText" value="<?php echo $_GET['search']; ?>" placeholder="请输入您要搜索的关键字">
        <input type="button" class="pa btn searchBtn cp">
    </div>
</div>
<script type="text/javascript">
(function(){
	var hostUrl = "http://"+"<?php echo $_SERVER['HTTP_HOST']; ?>/";
    var searchUrl = hostUrl+"project/index"; // 组装搜索链接
    var status = null;
    var curSearchUrl = "";
    <?php if($_GET['status'] != ''):?><?php echo "status=".$_GET['status'].";";?><?php endif;?>
	$("div.rightBoxTopFr input.searchBtn").click(function(){
		var oVal = $("div.rightBoxTopFr input.searchText").val();
		if(oVal == "" || oVal == null){
			layer.alert('请输入需要搜索的关键词');
			return false;
		};
		if(status == null){
			curSearchUrl = searchUrl+"/search/"+oVal;
		}else{
			curSearchUrl = searchUrl+"/status/"+status+"/search/"+oVal;
		};
		window.location.href = curSearchUrl;
	});	
})();
</script>